Skip to content

VirtualTimeSchedulerBase class

Defined in

Namespace: System.Reactive.Concurrency Assembly: System.Reactive.dll Full name: System.Reactive.Concurrency.VirtualTimeSchedulerBase<T1, T2> Modifiers: public abstract

Summary

        Base class for virtual time schedulers.
        

Applies to

netstandard2.0

Class hierarchy
classDiagram
class VirtualTimeSchedulerBase~T1,T2~
class IScheduler {
    <>
}
IScheduler <|.. VirtualTimeSchedulerBase~T1,T2~
class IServiceProvider {
    <>
}
IServiceProvider <|.. VirtualTimeSchedulerBase~T1,T2~
class IStopwatchProvider {
    <>
}
IStopwatchProvider <|.. VirtualTimeSchedulerBase~T1,T2~

Implements: IScheduler, IServiceProvider, IStopwatchProvider

Constructors

NameSummary
.ctorCreates a new virtual time scheduler with the default value of TAbsolute as the initial clock value.

Properties

NameSummary
IsEnabledGets whether the scheduler is enabled to run work.
ComparerGets the comparer used to compare absolute time values.
ClockGets the scheduler's absolute time clock value.
NowGets the scheduler's notion of current time.

Methods

NameSummary
AddAdds a relative time value to an absolute time value.
ToDateTimeOffsetConverts the absolute time value to a DateTimeOffset value.
ToRelativeConverts the TimeSpan value to a relative time value.
ScheduleAbsoluteSchedules an action to be executed at dueTime.
ScheduleRelativeSchedules an action to be executed at dueTime.
ScheduleSchedules an action to be executed.
StartStarts the virtual time scheduler.
StopStops the virtual time scheduler.
AdvanceToAdvances the scheduler's clock to the specified time, running all work till that point.
AdvanceByAdvances the scheduler's clock by the specified relative time, running all work scheduled for that timespan.
SleepAdvances the scheduler's clock by the specified relative time.
GetNextGets the next scheduled item to be executed.
GetServiceDiscovers scheduler services by interface type. The base class implementation supports only the IStopwatchProvider service. To influence service discovery - such as adding ...
StartStopwatchStarts a new stopwatch object.
Inherited members